class Student:
    count=0

    def __init__(self,name,score):
        self.name=name

        self.__score=score

        if score>=90.0:
            self.grade='A'
        elif score>=80.0:
            self.grade='B'
        elif score>=60.0:
            self.grade='C'
        else:
            self.grade='D'
        Student.count+=1

    def display_grade(self):
        print("%s的成绩等级为%s"%(self.name,self.grade))


if __name__=='__main__':
    """
    期末考试录入多人成绩，根据成绩，展示评级
    """
    student_1=Student('范淼',70.5)
    student_2=Student('刘晓龙',81.5)
    student_3=Student('陈蓓',96)
    student_4=Student('孙华枭',47.0)

    students={student_1,student_2,student_3,student_4}

    for student in students:
        student.display_grade()

